package com.felix.tests.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * @author Felix
 * @date 2019/11/30
 **/
@Data
public class DeviceMap {
    @JsonProperty(value = "Devices")
    private List<Devices> Devices;
    @JsonProperty(value = "KeyDic")
    private Map<String, String> KeyDic;

    @Data
    public static class Devices {
        @JsonProperty(value = "Id")
        private Integer Id;
        @JsonProperty(value = "Name")
        private String Name;
        @JsonProperty(value = "IPAddress")
        private String IPAddress;
        @JsonProperty(value = "Port")
        private Integer Port;
        @JsonProperty(value = "Devices")
        private List<DeviceItem> Devices;

        @Data
        public static class DeviceItem {
            @JsonProperty(value = "Id")
            private Integer Id;
            @JsonProperty(value = "GlobalId")
            private Integer GlobalId;
            @JsonProperty(value = "Name")
            private String Name;
            @JsonProperty(value = "Address")
            private Integer Address;
            @JsonProperty(value = "Register")
            private Integer Register;
            @JsonProperty(value = "ParameterName")
            private String ParameterName;
            @JsonProperty(value = "ParameterId")
            private Integer ParameterId;
            @JsonProperty(value = "DateType")
            private String DateType;
        }
    }
}
